<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <style type="text/css">
        .box1{
            width: 100px;
            height: 100px;
            background-color: #bbffaa;
        }
        .box2{
            width: 200px;
            height: 100px;
            background-color: rebeccapurple;
            float: left;
        }
        .box3{
            width: 300px;
            height: 100px;
            background-color: rosybrown;
        }
    </style>
</head>
<body>

<div class="box1"></div>
<div class="box2">box2浮动起来了，box3就上前移</div>
<div class="box3"></div>
</body>
</html>